package cn.santi.controller;

import cn.santi.domain.State;
import cn.santi.emuns.R;
import cn.santi.service.StateService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/state")
public class StateController {
    @Autowired
    private StateService sa;

    // //显示搜索动态列表
    // @GetMapping("/rankstatestate")
    // public R rankstatestate(String result,String type){
    //     QueryWrapper<State> wrapper = new QueryWrapper<>();
    //     wrapper.eq("classify",type).eq("state",0).like("title",result);
    //     return R.ok(sa.list(wrapper));
    // }
    //根据id查询动态
    // @GetMapping("/showstatebyid")
    // public R showstatebyid(int id){
    //     QueryWrapper<State> wrapper = new QueryWrapper<>();
    //     wrapper.eq("id",id).eq("state",0);
    //     return R.ok(sa.list(wrapper));
    // }
    //根据序号查询列表
    // @GetMapping("/showstate")
    // public R showstate(){
    //     QueryWrapper<State> wrapper = new QueryWrapper<>();
    //     wrapper.eq("state",0).orderByDesc("sequence");
    //     return R.ok(sa.list(wrapper));
    // }
}
